package com.liu.my_blog_system.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.sun.tracing.dtrace.ArgsAttributes;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * (TbImage)表实体类
 *
 * @author liuchengjie
 * @since 2021-04-20 14:16:50
 */
@SuppressWarnings("serial")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TbUploadFile extends Model<TbUploadFile> {
    @TableId(type = IdType.ASSIGN_ID)
    private String id;
    private String oldFileName;
    private String newFileName;
    private String extension;
    private String path;
    private String globalPath;
    private String size;
    private String type;
    private Integer downCounts;
    private String userId;
    @TableLogic
    private Boolean isDelete;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
